//角色管理
import request from "../../index";

//获取角色列表的接口
export const reqGetAdminList = () => request({
    url: '/admin/manage/getManageList',
    method: 'GET',
})

//添加新管理员
export const reqAddNewAdmin = (fd) => request({
    url: '/admin/manage/addNewAdmin',
    method: 'POST',
    data: {
        fd
    }
})

//修改管理员信息的接口
export const reqUpdateAdmin = ({admin_id, fd}) => request({
    url: '/admin/manage/editAdmin',
    method: 'POST',
    data: {
        admin_id, fd
    }
})


//删除管理员的接口
export const reqDeleteAdmin = ({admin_id}) => request({
    url: '/admin/manage/deleteAdmin',
    method: 'GET',
    params: {
        admin_id
    }
})
//批量删除管理员信息的接口
export const reqDeleteAdminList = (adminIds) => request({
    url: '/admin/manage/deleteAdmins',
    method: 'POST',
    data: {
        adminIds
    }
})


//个人中心
export const reqUpdatePhoneOrName = ({admin_id, fd}) => request({
    url: '/admin/admin-center/updatePhoneOrName',
    method: 'POST',
    data: {
        admin_id, fd
    }
})

export const reqUpdatePassword = ({admin_id, fd}) => request({
    url: '/admin/admin-center/updatePassword',
    method: 'POST',
    data: {
        admin_id, fd
    }
})
